Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add prompt template #75

Merged
merged 19 commits into from
Nov 1, 2024
Merged

Add prompt template #75

merged 19 commits into from
Nov 1, 2024

Conversation

kevin-on
Copy link
Collaborator

@kevin-on kevin-on commented Oct 31, 2024

Database structure change

Before:

Plugin
  └── RAGEngine
      └── VectorDbManager
          └── VectorDbRepository
              └── PGliteDatabase

After:

Plugin
  └── Database
      ├── PGliteDatabase
      ├── vector module
      │   ├── VectorManager
      │   └── VectorRepository
      └── template module
          ├── TemplateManager
          └── TemplateRepository

LexicalContentEditable

  • Extracted as an independent component to use in CreateTemplateDialog
  • Optional plugins (that are not used in CreateTemplateDialog) are passed as props:
plugins?: {
    vaultChat?: {
      onVaultChat: () => void
    }
    templatePopover?: {
      anchorElement: HTMLElement | null
    }
  }

Template plugins

  • CreateTemplatePopoverPlugin shows popover on selection
  • TemplatePlugin shows template options for "/" trigger

@kevin-on kevin-on linked an issue Oct 31, 2024 that may be closed by this pull request
src/database/schema.ts Outdated Show resolved Hide resolved
src/components/chat-view/Chat.tsx Outdated Show resolved Hide resolved
glowingjade
glowingjade previously approved these changes Nov 1, 2024
@glowingjade glowingjade merged commit f81cede into main Nov 1, 2024
1 check passed
@glowingjade glowingjade deleted the kevin/add-prompt-template branch November 1, 2024 08:30
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

feat: Add custom prompt template
3 participants